import { createApp } from 'vue'
import './assets/styles/index.css'
import App from './App.vue'
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import router from './router'; // 导入路由配置
import  pinia  from './stores';//状态管理

import { gsap } from 'gsap';
import formatter from '@/utils/formatter';

const app = createApp(App);

// 将 GSAP 注册为全局属性
app.config.globalProperties.$gsap = gsap;
// 全局注册 formatter 函数
app.config.globalProperties.$formatter = formatter;

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.use(router)
app.use(pinia);
app.use(ElementPlus)
app.mount('#app')
